{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "fluid-greece",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://pypi.doubanio.com/simple\n",
      "Requirement already satisfied: tqsdk in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (2.5.1)\n",
      "Requirement already satisfied: numpy in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (1.20.1)\n",
      "Requirement already satisfied: websockets>=8.1 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (9.0.1)\n",
      "Requirement already satisfied: aiohttp in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (3.7.4.post0)\n",
      "Requirement already satisfied: certifi in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (2020.12.5)\n",
      "Requirement already satisfied: pyjwt in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (2.1.0)\n",
      "Requirement already satisfied: psutil in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (5.8.0)\n",
      "Requirement already satisfied: scipy in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (1.6.1)\n",
      "Requirement already satisfied: shinny-structlog in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (0.0.4)\n",
      "Requirement already satisfied: pandas>=1.1.0 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (1.1.5)\n",
      "Requirement already satisfied: simplejson in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (3.17.2)\n",
      "Requirement already satisfied: requests in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from tqsdk) (2.25.1)\n",
      "Requirement already satisfied: python-dateutil>=2.7.3 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from pandas>=1.1.0->tqsdk) (2.8.1)\n",
      "Requirement already satisfied: pytz>=2017.2 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from pandas>=1.1.0->tqsdk) (2021.1)\n",
      "Requirement already satisfied: six>=1.5 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from python-dateutil>=2.7.3->pandas>=1.1.0->tqsdk) (1.15.0)\n",
      "Requirement already satisfied: attrs>=17.3.0 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from aiohttp->tqsdk) (20.3.0)\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from aiohttp->tqsdk) (1.6.3)\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from aiohttp->tqsdk) (5.1.0)\n",
      "Requirement already satisfied: async-timeout<4.0,>=3.0 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from aiohttp->tqsdk) (3.0.1)\n",
      "Requirement already satisfied: typing-extensions>=3.6.5 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from aiohttp->tqsdk) (3.7.4.3)\n",
      "Requirement already satisfied: chardet<5.0,>=2.0 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from aiohttp->tqsdk) (4.0.0)\n",
      "Requirement already satisfied: idna>=2.0 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from yarl<2.0,>=1.0->aiohttp->tqsdk) (2.10)\n",
      "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /root/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from requests->tqsdk) (1.26.3)\n",
      "\u001b[33mWARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "#!pip install --upgrade pip\n",
    "!pip install tqsdk -U\n",
    "#"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "forward-pasta",
   "metadata": {},
   "outputs": [
    {
     "ename": "ImportError",
     "evalue": "libpython3.7m.so.1.0: cannot open shared object file: No such file or directory",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mImportError\u001b[0m                               Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-2-106cabfa862e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqApi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTqAuth\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tqsdk/__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0mname\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"tqsdk\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapi\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqApi\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      7\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maccount\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqAccount\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTqKq\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      8\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mauth\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqAuth\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/tqsdk/api.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m     53\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mauth\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqAuth\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     54\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maccount\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqAccount\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTqKq\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 55\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmultiaccount\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqMultiAccount\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     56\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbacktest\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqBacktest\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTqReplay\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     57\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtqsdk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchannel\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTqChan\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mImportError\u001b[0m: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory"
     ]
    }
   ],
   "source": [
    "from tqsdk import TqApi, TqAuth"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "understanding-advocate",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
